package com.UnionPayCenter.coupon.manager.impl;

import com.UnionPayCenter.coupon.manager.CouponManager;
import com.UnionPayCenter.entity.CouponEntity;
import com.UnionPayCenter.mapper.CouponMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author noah
 * @since 1.0.0, 2019/09/20
 */
@Service
public class CouponManagerImpl implements CouponManager {

    @Autowired
    private CouponMapper couponMapper;


    @Override
    public CouponEntity couponQuery(Integer disTypeId) {
        return couponMapper.selectByPrimaryKey(disTypeId);
    }

    @Override
    public void couponUpdate(CouponEntity couponEntity) {
        couponMapper.updateByPrimaryKeySelective(couponEntity);
    }
}
